import Mock from 'mockjs'
import homeApi from "./mockData/home"
import userApi from './mockData/user'
import permissionApi from './mockData/permission'

//拦截请求,可以使用正则或者接口
//Mock.mock('/home/getTableData',homeApi.getTableData)
Mock.mock(/home\/getTableData/, 'get', homeApi.getTableData)
Mock.mock(/home\/getCountData/, 'get', homeApi.getCountData)
Mock.mock(/home\/getEchartData/, 'get', homeApi.getEchartData)
Mock.mock(/user\/getUser/, 'get', userApi.getUserList)
Mock.mock(/user\/addUser/, 'post', userApi.createUser)
Mock.mock(/user\/deleteUser/, 'get', userApi.deleteUser)
Mock.mock(/user\/editUser/, 'post', userApi.updateUser)
Mock.mock(/permission\/getMenu/, 'post', permissionApi.getMenu)